<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!-- public quote -->
<%@include file="/jsp/comm_css_include.jsp"%>
<!doctype html>
<html>
<head>
</head>
<body class="gray-bg">
	   <div class="business-manwife">车贷信息(静态)</div>
       <div class="padding-nono">
         <table cellpadding="0" cellspacing="0" border="0" class="buyinfor-table" id="buyinfor-t">
			<tr>	
				<td align="right">
					<label class="control-label np">贷款银行：</label>
				</td>
				<td>
					<input id="loanId" name="loanId" type="hidden"/>
					<select class="select-control" id="dk_bank" name="dk_bank" onchange="onDkBank()">
   						<option value="bank_001">工商银行杭州羊坝头支行</option>
   						<option value="bank_002">中国银行杭州武林支行</option>
   					</select>
				</td>
				
				<td align="right">
					<label class="control-label np">贷款模式：</label>
				</td>
				<td calss="bankshow">
				    <select class="select-control" id="dk_pattern" name="dk_pattern" onchange="dkPattern();">
				    	<option value="pattern_001">卡袋-平息</option>
					    <option value="pattern_002">卡袋-高息</option>
   					</select>
				</td>
				<td  class="bankhidden">
				    <select class="select-control" id="dk_pattern" name="dk_pattern" onchange="dkPattern();">
   						<option value="pattern_003">中国银行算法</option>
   					</select>
				</td>

			</tr>
			
			<tr>	
				<td align="right">
					<label class="control-label np">二手车车龄：</label>
				</td>
				<td>
					<input id="carAge" name="carAge" minlength="1" maxlength="20" type="number" class="form-control" required="" aria-required="true"  placeholder="请输入二手车车龄，没有请输入0" value="0">
				</td>
				
				<td align="right">
					<label class="control-label np">贷款期限：</label>
				</td>
				<td>
					<mytag:selectTag id="loanMonth" name="loanMonth" map="${loanMonthType }" others="class='select-control' required='required'"/>
				</td>
			</tr>
			
			<tr>	
				<td align="right">
					<label class="control-label np">汽车价格：</label>
				</td>
				<td>
					<input id="" name="" minlength="1" maxlength="20" type="number" class="form-control" required="" aria-required="true" placeholder="汽车价格" >
				</td>
				<td align="right">
					<label class="control-label np">二手车评估价：</label>
				</td>
				<td>
					<input id="" name="" minlength="1" maxlength="20" type="number" class="form-control" required="" aria-required="true" placeholder="二手车评估价" >
				</td>
			</tr>
			
			<tr>	
				<td align="right">
					<label class="control-label np">银行基准利率：</label>
				</td>
				<td>
					<input id="" name="" minlength="1" maxlength="20" type="number" class="form-control" required="" aria-required="true" placeholder="银行基准利率" >
				</td>
																			
				<td align="right">
					<label class="control-label np">实际贷款额：</label>
				</td>
				<td>
					<input id="loanAmount" name="loanAmount" minlength="1" maxlength="20" type="number" class="form-control" required="" aria-required="true" placeholder="实际贷款额" >
				</td>
			</tr>
			
			<tr id="dk_banktr">
				<td align="right" id="servicePriceLabel">
					<label class="control-label np">按揭服务费：</label>
				</td>
				<td id="servicePriceInput">
					<input id="servicePrice" name="servicePrice"  minlength="1" maxlength="20" type="number" class="form-control" required="" aria-required="true" placeholder="按揭服务费" >
				</td>
			</tr>
		</table>
	</div>
	<!-- public quote -->
    <%@include file="/jsp/comm_js_include.jsp"%>

 	<!-- custom js -->
    
    
	<script type="text/javascript">
	var onDkBank = function()
	{	
		var dk_bank = document.getElementById("dk_bank").value;
		if(dk_bank == "bank_001")
		{	
			var objs = '<option value="pattern_001">卡袋-平息</option>'
					 + '<option value="pattern_002">卡袋-高息</option>';
			$("#dk_pattern").html(objs);
			var content = '<tr>'
					+ '<td align="right" id="servicePriceLabel">'
						+ '<label class="control-label np">按揭服务费：</label>'
					+ '</td>'
					+ '<td id="servicePriceInput">'
						+ '<input id="servicePrice" name="servicePrice"  minlength="1" maxlength="20" type="number" class="form-control" required="" aria-required="true" placeholder="按揭服务费" >'
					+ '</td>'
			    + '</tr>';
			document.getElementById("dk_banktr").innerHTML = content;
			return;
		}
		var objs = '<option value="pattern_003">中国银行算法</option>';
		$("#dk_pattern").html(objs);
		document.getElementById("dk_banktr").innerHTML = "";
	}
	var dkPattern = function()
	{	
		var dk_bank = document.getElementById("dk_pattern").value;
		if(dk_bank == "pattern_001")
		{
			var content = '<tr>'
				+ '<td align="right" id="servicePriceLabel">'
					+ '<label class="control-label np">按揭服务费：</label>'
				+ '</td>'
				+ '<td id="servicePriceInput">'
					+ '<input id="servicePrice" name="servicePrice"  minlength="1" maxlength="20" type="number" class="form-control" required="" aria-required="true" placeholder="按揭服务费" >'
				+ '</td>'
		    + '</tr>';
			document.getElementById("dk_banktr").innerHTML = content;
			return;
		}
		if(dk_bank == "pattern_002"){
			var content = '<tr>'
				+ '<td align="right" id="servicePriceLabel">'
					+ '<label class="control-label np">签约公司利率：</label>'
				+ '</td>'
				+ '<td id="servicePriceInput">'
					+ '<input id="trial_rate" name="trial_rate" minlength="1" maxlength="20" type="number" class="form-control" required="" aria-required="true" placeholder="签约公司利率" >'
				+ '</td>'
		    + '</tr>';
			document.getElementById("dk_banktr").innerHTML = content;
			return;
		}

	}
	</script>
</body>
</html>
